package com.ch.databinddemo

import android.util.Log
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel

class MyViewModel : ViewModel() {

     var curNumber: MutableLiveData<Int> = MutableLiveData()

    init {
        curNumber.value=100
    }

    fun addNumber(index:Int) {
        curNumber.value = (curNumber.value?.plus(index))
    }

//    fun getNumber(): MutableLiveData<Int> {
//        return curNumber
//    }
}